<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>flex布局-行对齐方式</title>
  <style>
    .box {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;

      /* 调整行对齐方式: 对单行弹性盒子不生效 */

      /* 默认值,弹性盒子从起点开始依次排列 */
      /* align-content: flex-start; */

      /* 弹性盒子从终点开始依次排列 */
      /* align-content: flex-end; */

      /* 弹性盒子沿主轴居中排列 */
      /* align-content: center; */

      /* 弹性盒子沿主轴均匀排列,空白间距均分在弹性盒子之间 */
      /* align-content: space-between; */

      /* 弹性盒子沿主轴均匀排列,空白间距均分在弹性盒子两侧 */
      /* align-content: space-around; */

      /* 弹性盒子沿主轴均匀排列,弹性盒子与容器之间间距相等 */
      align-content: space-evenly;

      height: 400px;
      border: 1px solid #000;
    }
    .box div {
      width: 200px;
      height: 100px;
      background-color: pink;
    }
  </style>
</head>
<body>
  <div class="box">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    <div>7</div>
    <div>8</div>
  </div>
</body>
</html>